<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>俯卧撑管理</title>
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <link rel="stylesheet" href="/bootstrap/css/bootstrap.min.css">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="/dist/css/AdminLTE.min.css">
  <link rel="stylesheet" href="/dist/css/skins/skin-blue.min.css">

  <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->
</head>
<body class="hold-transition skin-blue sidebar-mini">

      <div class="box">
            <div class="box-header">
              
            </div>
            <!-- /.box-header -->
            <div class="box-body no-padding">
              <table class="table table-condensed table-striped table-bordered">
                <tbody>
                <tr>
                  <th class="text-center">
                      <div class="checkbox">
                          <label>
                            <input type="checkbox">
                          </label>
                        </div>
                  </th>
                  <th class="text-center">序号</th>
                  <th class="text-center">标题</th>
                  <th class="text-center">评分</th>
                  <th class="text-center">操作</th>
                </tr>
                <% if (result.length == 0) { %>
                  <tr >
                    <td class="text-center" colspan="5">暂无数据</td>
                  </tr>
                <% } else { %>
                  <% for (var i = 0; i < result.length; i++) { %>
                      <tr >
                          <td class="text-center">
                              <div class="checkbox">
                                  <label>
                                    <input type="checkbox">
                                  </label>
                                </div>
                          </td>
                        <td class="text-center"><%= i + 1 %></td>
                        <td class="text-center"><%= result[i].title %></td>
                        <td class="text-center" >
                          <%= result[i].rating.average %>
                        </td>
                        <td class="text-center">
                          <button class="btn btn-warning btn-xs" onclick="edit(<%= i %>, '<%= result[i].username %>', <%= result[i].run %>)">编辑</button>
                          <a href="/pushup/delete?username=<%= result[i].username %>"><button class="btn btn-danger btn-xs">删除</button></a>
                        </td>
                      </tr>
                      
                  <% } %>

                <% } %>
                
                </tbody></table>
                
            </div>
            <!-- /.box-body -->
          </div>
   
<!-- ./wrapper -->
</script>
</body>
</html>
